﻿using System;
using JLL.China.Infrastructure.Repositories.LINQ2SQL;
using JLL.China.Model;
using System.Linq;

using JLL.China.Infrastructure.RepositoryFramework;
using JLL.China.Infrastructure.Repositories;


namespace JLL.China.Infrastructure.Services
{
    public static class ProjectNameService
    {
        public static int  Add(decimal? Id,string en_name,string local_name,string types){
            var dbc = new JLLCHINADataContext();
            return dbc.sp_projectname_create(Id,en_name, local_name,types);
        }
        public static bool CheckExits(string name)
        {
            var dbc = new JLLCHINADataContext();
           var item =  dbc.ProjectNames.SingleOrDefault(x => x.Value.Equals(name));
            if(item !=null) 
                return true;

            return false;
        }
      
    }
}
